import React from 'react';
import { Button, Checkbox, Form, Input, Select } from 'antd';
const onFinish = values => {
    console.log('Success:', values);
};
const MyForm = () => (
    <Form
        onFinish={onFinish}
    >
        <Form.Item
            label="Username"
            name="username"
            rules={[{ required: true, message: '请输入账号' }]}
        >
            <Input />
        </Form.Item>

        <Form.Item
            label="Password"
            name="password"
            rules={[{ required: true, message: '请输入密码！' }]}
        >
            <Input.Password />
        </Form.Item>

        <Form.Item name="home" valuePropName="checked" label={null}>
            <Select
                defaultValue="lucy"
                style={{ width: 120 }}
                options={[
                    { value: 'jack', label: 'Jack' },
                    { value: 'lucy', label: 'Lucy' },
                    { value: 'Yiminghe', label: 'yiminghe' },
                    { value: 'disabled', label: 'Disabled', disabled: true },
                ]}
            />
        </Form.Item>

        <Form.Item label={null}>
            <Button type="primary" htmlType="submit">
                Submit
            </Button>
        </Form.Item>
    </Form>
);
export default MyForm;